<?php
/**
 * File:          KValidator_Parameter_Text_In
 * Description:   -
 * Author:        Kovac "Kovacou'" Alexandre (www.kovacou.fr)
 * Last Update:   21/04/2011
 */

   class KValidator_Parameter_Text_In implements KValidatorParameter {
      public  $list;
      
      public function valid ($value, $config) {
         if (true === $config[1]) {
            $this->list = array_map("mb_strtolower", $this->list);
            $value      = mb_strtolower ($value);
         }
         
         if (false === in_array($value, $this->list))
            return "Contient une valeur invalide.";
      }
   }
 
/**
 * End
 * Of
 * File
 */
?>